/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.sample.library.model;

import com.liferay.portal.model.ModelWrapper;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * This class is a wrapper for {@link AuthorBook}.
 * </p>
 *
 * @author    Nguyen Tuan Anh
 * @see       AuthorBook
 * @generated
 */
public class AuthorBookWrapper implements AuthorBook, ModelWrapper<AuthorBook> {
	public AuthorBookWrapper(AuthorBook authorBook) {
		_authorBook = authorBook;
	}

	public Class<?> getModelClass() {
		return AuthorBook.class;
	}

	public String getModelClassName() {
		return AuthorBook.class.getName();
	}

	public Map<String, Object> getModelAttributes() {
		Map<String, Object> attributes = new HashMap<String, Object>();

		attributes.put("bookId", getBookId());
		attributes.put("authorId", getAuthorId());

		return attributes;
	}

	public void setModelAttributes(Map<String, Object> attributes) {
		Long bookId = (Long)attributes.get("bookId");

		if (bookId != null) {
			setBookId(bookId);
		}

		String authorId = (String)attributes.get("authorId");

		if (authorId != null) {
			setAuthorId(authorId);
		}
	}

	/**
	* Returns the primary key of this author book.
	*
	* @return the primary key of this author book
	*/
	public com.sample.library.service.persistence.AuthorBookPK getPrimaryKey() {
		return _authorBook.getPrimaryKey();
	}

	/**
	* Sets the primary key of this author book.
	*
	* @param primaryKey the primary key of this author book
	*/
	public void setPrimaryKey(
		com.sample.library.service.persistence.AuthorBookPK primaryKey) {
		_authorBook.setPrimaryKey(primaryKey);
	}

	/**
	* Returns the book ID of this author book.
	*
	* @return the book ID of this author book
	*/
	public long getBookId() {
		return _authorBook.getBookId();
	}

	/**
	* Sets the book ID of this author book.
	*
	* @param bookId the book ID of this author book
	*/
	public void setBookId(long bookId) {
		_authorBook.setBookId(bookId);
	}

	/**
	* Returns the author ID of this author book.
	*
	* @return the author ID of this author book
	*/
	public java.lang.String getAuthorId() {
		return _authorBook.getAuthorId();
	}

	/**
	* Sets the author ID of this author book.
	*
	* @param authorId the author ID of this author book
	*/
	public void setAuthorId(java.lang.String authorId) {
		_authorBook.setAuthorId(authorId);
	}

	public boolean isNew() {
		return _authorBook.isNew();
	}

	public void setNew(boolean n) {
		_authorBook.setNew(n);
	}

	public boolean isCachedModel() {
		return _authorBook.isCachedModel();
	}

	public void setCachedModel(boolean cachedModel) {
		_authorBook.setCachedModel(cachedModel);
	}

	public boolean isEscapedModel() {
		return _authorBook.isEscapedModel();
	}

	public java.io.Serializable getPrimaryKeyObj() {
		return _authorBook.getPrimaryKeyObj();
	}

	public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
		_authorBook.setPrimaryKeyObj(primaryKeyObj);
	}

	public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
		return _authorBook.getExpandoBridge();
	}

	public void setExpandoBridgeAttributes(
		com.liferay.portal.service.ServiceContext serviceContext) {
		_authorBook.setExpandoBridgeAttributes(serviceContext);
	}

	@Override
	public java.lang.Object clone() {
		return new AuthorBookWrapper((AuthorBook)_authorBook.clone());
	}

	public int compareTo(AuthorBook authorBook) {
		return _authorBook.compareTo(authorBook);
	}

	@Override
	public int hashCode() {
		return _authorBook.hashCode();
	}

	public com.liferay.portal.model.CacheModel<AuthorBook> toCacheModel() {
		return _authorBook.toCacheModel();
	}

	public AuthorBook toEscapedModel() {
		return new AuthorBookWrapper(_authorBook.toEscapedModel());
	}

	@Override
	public java.lang.String toString() {
		return _authorBook.toString();
	}

	public java.lang.String toXmlString() {
		return _authorBook.toXmlString();
	}

	public void persist()
		throws com.liferay.portal.kernel.exception.SystemException {
		_authorBook.persist();
	}

	/**
	 * @deprecated Renamed to {@link #getWrappedModel}
	 */
	public AuthorBook getWrappedAuthorBook() {
		return _authorBook;
	}

	public AuthorBook getWrappedModel() {
		return _authorBook;
	}

	public void resetOriginalValues() {
		_authorBook.resetOriginalValues();
	}

	private AuthorBook _authorBook;
}